package com.tinyseed.hmxx.admin;

import com.tinyseed.hmxx.common.utils.SpringContextHolder;
import com.tinyseed.hmxx.common.utils.SpringUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableAsync
@SpringBootApplication(scanBasePackages = {"com.tinyseed"})
@EnableTransactionManagement
public class HmxxAdminApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(HmxxAdminApplication.class, args);
        SpringUtil.setApplicationContext(context);

    }
    @Bean
    public SpringContextHolder springContextHolder() {
        return new SpringContextHolder();
    }

}
